<?php
	// 加载公共文件
	include_once('../../public/config/sql.php');
	include_once('../../public/config/config.php');
	include_once('../../public/packfunc/strPoseJump.php');

	// 实例化对象
	$obj = new sql($info);

	// 接收post传值
	$file      =   isset($_FILES['file']) ? $_FILES['file'] : '';
	$name      =   isset($_POST['name']) ? $_POST['name'] : '';
	$users     =   isset($_POST['users']) ? $_POST['users'] :'';
	$passOne   =   isset($_POST['passOne']) ? md5($_POST['passOne']) : '';
	$email     =   isset($_POST['email']) ? $_POST['email'] : '';
	$describe  =   isset($_POST['describe']) ? $_POST['describe'] : '';


	// 文件上传处理
	$file = new strPoseJump($file);
	$upload = $file->arry[0];
	
	// 构建sql语句
	$sql ="insert into users(img,name,username,password,email,content) values('$upload','$name','$users','$passOne','$email','$describe')";

	if($obj->db_insert($sql)){

		header('location:../delayJump.php?param=users_list');
	}else{

		header('location:./index.php?param=users_insert');
	}


?>